<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../include/admincontent.jsp" %>
<div id="location">当前位置：报表管理 > 招聘人员结果</div>
<div id="Content" class="report-cont">
    <div class="help"><b>提示：</b>请先选择导出条件查询后再在查询列表中进行导出。</div>
    <!-- 筛选条件 -->
    <div>
        <form class="layui-form search-form" method="post">
            <div class="layui-row">
                <div class="layui-col-sm10">
                    <div class="layui-form-item ">
                        <label class="layui-form-label other-label">招聘方案: </label>
                        <div id="cat_ids1"></div>
                    </div>
                </div>
                <div class="toolbars">
                    <a id="searchbtn" >
                        <em class="ico16 search_16"></em>
                        <span class="menu_span" title="查询">查询</span>
                    </a>
                </div>
            </div>
        </form>
    </div>

    <table class="treeTable" id="test" lay-filter="test"></table>
</div>
<link rel="stylesheet" href="/resources/js/plugins/layui/css/layui.css"  media="all">
<script src="/resources/js/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript">
    var tagData = [{"id":12,"name":"简历筛选","status":1},{"id":13,"name":"面试"},{"id":14,"name":"背景调查"},{"id":15,"name":"体检"},{"id":16,"name":"实习"},{"id":17,"name":"录用"}];
    var catData ;
    $(function () {
        $.ajax({url:'/Report/getProjectFlowsSelectJson',dataType:'json',success:function (json) {
                catData=json.datas;
                layui.config({
                    base : '/resources'
                }).extend({
                    selectN: '/js/plugins/layui_exts/layui-select-ext/selectN',
                    selectM: '/js/plugins/layui_exts/layui-select-ext/selectM',
                }).use(['layer','form','jquery','selectN','selectM','table','util',], function(){
                    var table = layui.table;
                    $ = layui.jquery;
                    var form = layui.form
                        ,util = layui.util
                        ,selectN = layui.selectN
                        ,selectM = layui.selectM;

                    util.fixbar({
                        top: true
                        , css: {right: 10, bottom: 10}
                        , bgcolor: '#393D49'
                    });

                    var catIns1 = selectN({
                        //元素容器【必填】
                        elem: '#cat_ids1'
                        ,search:[false,true]
                        ,tips: ['请选择招聘类型','请选择招聘方案','请选择结束流程']
                        //候选数据【必填】
                        ,data: catData
                        ,last:true
                    });

                    form.on('select(cat_ids1)',function (data) {
                        catIns1.change($(data.elem));
                        if(catIns1.isSelected){
                            table.render({
                                elem: '#test'
                                ,url:'/Report/getProjectUserByLastFlow?fid='+catIns1.lastValue
                                ,toolbar: true
                                ,title: '招聘结果'
                                ,totalRow: false
                                ,limits:[10,50,100,200,500,1000,2000,5000,10000]
                                ,cols: [[
                                    {field:'ID', title:'ID',  width:80, fixed: 'left', hide: true}
                                    ,{field:'NAME', title:'姓名', width:120, fixed: 'left' }
                                    ,{field:'CARDNO', title:'身份证', minWidth:100,fixed: 'left'}
                                    ,{field:'BIRTHDAY', title:'年龄', width:80, sort: true }
                                    ,{field:'SEXNAME', title:'性别', width:80,  sort: true}
                                    ,{field:'UNIVERSITY', title:'毕业院校',  width:120,  sort: true}
                                    ,{field:'MAJORNAME', title:'专业', width:100,  sort: true}
                                    ,{field:'EDUCATIONNAME', title:'学历', width:80,  sort: true}
                                    ,{field:'JOBNAME', title:'岗位组', width:100,  sort: true}
                                    ,{field:'STATE', title:'简历筛选', width:120, sort: true}
                                    ,{field:'MSRESULT', title:'面试',width:100}
                                    ,{field:'ZSSTATE', title:'背景调查', width:100}
                                    ,{field:'TJSTATE', title:'体检', width:100}
                                    ,{field:'SXSTATE', title:'实习', width:100}
                                    ,{field:'BDSTATE', title:'录用', width:120}
                                    ,{field:'TOTALREMARK', title:'备注', edit: 'text', width:120}
                                ]]
                                ,page: true
                                ,response: {
                                    statusCode: 200 //重新规定成功的状态码为 200，table 组件默认为 0
                                }
                                ,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
                                    return {
                                        "code": 200, //解析接口状态
                                        "msg": res.message, //解析提示文本
                                        "count":  res.totalResult, //解析数据长度
                                        "data": res.datas //解析数据列表
                                    };
                                }
                            });
                        }
                    });
                    table.render();
                });
            }
        });
    });
</script>
</body>
</html>